Technical Field
The present invention relates to the field of data communication, and more particularly to an Android-based communication technology for applications.
Related Art
With the rapid development of science and technology, Android devices like smart phones are emerging and developing rapidly. Since its advent, the Android system has gradually gained market share due to its obvious advantages. In China, the application of the Android system is no longer limited to the mobile phone industry, and has been rapidly extended to relevant fields, for example, of tablets, in-vehicle systems, television STB, intelligent appliances, and intelligence conference systems.
However, for developers and Internet companies that adopt the Android system, they shall not be satisfied with various applications that are developed based on the native Android system, but also need to further customize Android systems having special characteristics of their own. Especially for television manufacturers, it is very important to have a unique system, with which they can quickly adapt to the iteration and upgrade of chips. Therefore, how to customize and create a system that can be used for upper-layer development becomes a priority problem to be resolved by those manufacturers.
To create a set of system-level applications based on Android or customize an Android system having special characteristics, it is inevitable to use a communication method such as an inter-process communication method. It is known that on the Android system, there are only two communication methods for applications: Binder mechanism and SOCKET communication mechanism. At present, most television manufacturers adopt only the Binder mechanism or the SOCKET mechanism, or even a broadcast mechanism, which, however, has some deficiencies and cannot completely meet the requirements of an open platform-based system.
Use of the SOCKET mechanism can reduce the coupling of various resource modules, so that an independent module can implement an independent resource interface. In this way, the system can still run normally after a module collapses. However, the universality of the SOCKET interface results in low transmission efficiency and high overloads, and the SOCKET interface is not suitable for real-time communication among multiple processes, but is more suitable for data transmission and communication among different machines. In addition, when the SOCKET mechanism is used, each modules needs a port number in order to implement communication; in this case, when third-party applications are integrated, port numbers needs to be assigned, and if system applications need to communicate with the third-party application, the system applications need to obtain the port numbers of the applications in order to implement communication, which greatly impedes the development of software platforms and integration of abundant third-party applications. Based on the above, the mechanism of creating system-level applications by using the SOCKET mechanism has obvious deficiencies.
When the Binder mechanism is used, because only the Binder mechanism and an AIDL callback method are used, upper-layer applications bundle all module functions to one service process in order to normally call all available resource interfaces, leading to excessively tight coupling of the system. Once the core service process that provides resource interfaces dies, the whole system can no longer work, which causes great inconvenience to the user, leading to poor user experience.